<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<script type="text/javascript" src="../../res/js/jquery-3.1.1.min.js"></script>
<link rel="stylesheet" href="../../res/layui/css/layui.css" media="all">
<script src="../../res/layui/layui.js"></script>
<script src="../../res/js/Tools.js"></script>
<body>
<form class="layui-form" action="" lay-filter="example" id="example">
    <input type="hidden" name="auId" id="auId">
    <input type="hidden" name="saId" id="saId">
    <input type="hidden" name="athleteId" id="athleteId">

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">审核意见</label>
        <div class="layui-input-block">
            <textarea placeholder="请输入内容" class="layui-textarea"  name="auExp" id="auExp" lay-verify="required"></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="submit" class="layui-btn" lay-submit="" lay-filter="demo">确认不同意</button>
        </div>
    </div>
</form>
</body>
<script>
    layui.use('form',function(){
        var form = layui.form;
        var saId = getQueryString("schemeId");
        $("#saId").val(saId);

        form.on('submit(demo)',function(){
            var url="../../atsAduit/updateno";
            var formdata = new FormData(document.getElementById("example"));

            $.ajax({
                url:url,
                type:"post",
                data:formdata,
                async:false, // 全局同步
                processData:false,
                contentType:false,
                dataType:"json",
                success:function(obj){

                    if(obj.num==1){

                        layer.msg('操作成功',{
                            icon:1,
                            time:1000,
                        },function(){
                            var indexs = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(indexs);
                            parent.table2.reload();
                        });

                    }else{
                        layer.msg("操作失败");
                    }
                },
                error:function(e){
                    alert("失败");
                }
            });
            return false;
        })
    });
</script>
</html>